<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>绝对定位的居中显示</title>
		<style>
			.box {
				position: absolute;
				left: 50%;
				margin-left: -50px;
				width: 100px;
				height: 100px;
				background-color: yellow;
				/* margin:auto; */
				
			}
		</style>
	</head>
	<body>
		<div class="box">
			
		</div>
	</body>
</html>